From: Jerome Brenier Date: Thu, 10 Apr 2025 18:04:22 +0000 (+0200) Subject: magnifier : Fix delayed variables checking X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~139^2^2~15 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5514502277acf85e3273a77f0b35a66ecf5b71ed;p=gnome-shell.git magnifier : Fix delayed variables checking A type-safe comparision against null can be incorrectly positive with never initialized variables (undefined). As spotted in https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3688#note_2407551, allowing for type coercion avoids this situation. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7854 Part-of: --- diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js index 017451cc3..3b5c011a7 100644 --- a/js/ui/magnifier.js +++ b/js/ui/magnifier.js @@ -1280,7 +1280,7 @@ class ZoomRegion { this._clearScrollContentsTimer(); this._scrollContentsTimerId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, POINTER_REST_TIME, () => { this._followingCursor = false; - if (this._xDelayed !== null && this._yDelayed !== null) { + if (this._xDelayed != null && this._yDelayed != null) { this._scrollContentsToDelayed(this._xDelayed, this._yDelayed); this._xDelayed = null; this._yDelayed = null;